12+4 > 16 | 5.2-1.2 <= 2.0+2 | 2*3-4 == 1+1 |
false | true | true |
What do you imagine is the result of evaluating the Boolean expression:
4.0/3.0 == 1.0 + 1.0/3.0
Probably you think that it is true. Probably it is. But not certainly. Floating point arithmetic is not exact arithmetic and for precise results, you should never trust an "exactly equals" comparison with floats. The problem is that some numbers require an unlimited number of bits to be represented exactly. Even with a 64 bit double there will be a slight error. As another example, even the following might come out to be false:
10.0 + 0.1 == 10.1
Sometimes when unquestionable precision is needed, integer arithmetic is used. This is one reason why Java has 64 bit long integers.